-- GENERATED SPELL FOR [Gurubashi Bat Rider] --


function spell0_14750(pUnit, Event) --@Battle Command,Self--
pUnit:FullCastSpellOnTarget(5115,pUnit)
pUnit:RegisterEvent('Sorts_14750', 6313, 1)
end

function spell1_14750(pUnit, Event) --@Demoralizing Shout,Self--
pUnit:FullCastSpellOnTarget(23511,pUnit)
pUnit:RegisterEvent('Sorts_14750', 30344, 1)
end

function spell2_14750(pUnit, Event) --@Infected Bite,n/a--
pUnit:FullCastSpellOnTarget(16128,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14750', 0, 1)
end

function spell3_14750(pUnit, Event) --@Thrash,Self--
pUnit:FullCastSpellOnTarget(3391,pUnit)
pUnit:RegisterEvent('Sorts_14750', 623, 1)
end

function spell4_14750(pUnit, Event) --@Throw Liquid Fire,Self--
pUnit:FullCastSpellOnTarget(23968,pUnit)
pUnit:RegisterEvent('Sorts_14750', 0, 1)
end

function spell5_14750(pUnit, Event) --@Unstable Concoction,Self--
pUnit:FullCastSpellOnTarget(24024,pUnit)
pUnit:RegisterEvent('Sorts_14750', 3000, 1)
end

function Sorts_14750(pUnit, Event)
local choix_sorts_14750 = math.random(0, 5)
if choix_sorts_14750 == 0 then
pUnit:RegisterEvent('spell0_14750', 1, 1)
end
if choix_sorts_14750 == 1 then
pUnit:RegisterEvent('spell1_14750', 1, 1)
end
if choix_sorts_14750 == 2 then
pUnit:RegisterEvent('spell2_14750', 1, 1)
end
if choix_sorts_14750 == 3 then
pUnit:RegisterEvent('spell3_14750', 1, 1)
end
if choix_sorts_14750 == 4 then
pUnit:RegisterEvent('spell4_14750', 1, 1)
end
if choix_sorts_14750 == 5 then
pUnit:RegisterEvent('spell5_14750', 1, 1)
end
end

function mob14750_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_14750', math.random(1500, 3000), 1)
end

function mob14750_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14750_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14750_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(14750, 1, 'mob14750_Action')
RegisterUnitEvent(14750, 2, 'mob14750_Leave')
RegisterUnitEvent(14750, 3, 'mob14750_Kill')
RegisterUnitEvent(14750, 4, 'mob14750_Die')
